package com.chen.service;

import com.chen.entity.FlightEntity;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;

/*
 * 在软件架构中，Service层通常指的是服务层，它是应用程序架构中的一个中间层，
 * 位于表示层（用户界面层）和数据访问层（DAO层）之间。
 * */
//业务逻辑层
public interface FlightService {
    List<FlightEntity> getByAll();

    int deleteFlightById(Integer id);

    FlightEntity getByIdFlight(Integer id);

    int updateFlight(FlightEntity flightEntity);

    int insertFlight(FlightEntity flightEntity);

    void strIsEmpty(String str, HttpServletRequest req, HttpServletResponse resp);

    FlightEntity setEntity(Integer id, String flightId, String company, String departureAirport, String arriveAirport, Date departureTime, Date arriveTime, String model, Float cost);

    int updateDeleteById(Integer id);

    List<FlightEntity> searchByAll(String departureAirport, String arriveAirport);
}
